home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / amos / AMOSList-0998.lzh / AMOSLIST / 000020_bounce-amos-li…net@onelist.com_Tue Sep 1 20:21:53 1998.msg < prev    next >
Text File  |  1998-10-01  |  7KB  |  250 lines

  1. >From bounce-amos-list--880-mcox=access.digex.net@onelist.com  Tue Sep  1 20:21:53 1998
  2. Received: from onelist.com (pop.onelist.com [209.207.135.253])
  3.     by pony-1.mail.digex.net (8.8.8/8.8.8) with SMTP id UAA06175
  4.     for <mcox@access.digex.net>; Tue, 1 Sep 1998 20:21:52 -0400 (EDT)
  5. Received: (qmail 17347 invoked by alias); 2 Sep 1998 00:19:23 -0000
  6. Received: (qmail 17316 invoked from network); 2 Sep 1998 00:19:19 -0000
  7. Received: from unknown (HELO mail.enterprise.net) (194.72.192.18) by pop.onelist.com with SMTP; 2 Sep 1998 00:19:19 -0000
  8. Received: from enterprise.net (root@ppp-168.telinco.com [195.188.107.168]) by mail.enterprise.net (8.8.5/8.8.5) with SMTP id BAA20713 for <amos-list@onelist.com>; Wed, 2 Sep 1998 01:21:42 +0100 (GMT/BST)
  9. From: Andrew Crowe <andrewcrowe@enterprise.net>
  10. To: amos-list@onelist.com
  11. Date: Wed, 02 Sep 1998 01:06:39 +0000
  12. Message-ID: <yam7549.1958.1197282024@mail.enterprise.net>
  13. In-Reply-To: <004301bdd5fa$4d707d80$99ecabc3@np5gt>
  14. X-Mailer: YAM 2.0 Preview5 - Amiga Mailer by Marcel Beck - http://www.yam.ch
  15. Organization: Manta Soft
  16. Mailing-List: list amos-list@onelist.com; contact http://www.onelist.com
  17. Delivered-To: mailing list amos-list@onelist.com
  18. Precedence: bulk
  19. Reply-to: amos-list@onelist.com
  20. Mime-Version: 1.0
  21. Content-type: multipart/mixed; boundary="BOUNDARY.1197282024.4"
  22. Subject: [amos-list] Re: Snow 2, the new batch
  23. Status: O
  24. X-Status: 
  25.  
  26. From: Andrew Crowe <andrewcrowe@enterprise.net>
  27.  
  28. Warning: This is a message in MIME format. Your mail reader does not
  29. support MIME. Some parts of this message will be readable as plain text.
  30. To see the rest, you will need to upgrade your mail reader.
  31.  
  32.  
  33. --BOUNDARY.1197282024.4
  34. Content-Type: text/plain
  35.  
  36. Hi Everybody,
  37.  
  38. On 01-Sep-98, "John Glanville" <John.Glanville@btinternet.com> wrote:
  39. > Okay do you use point in Your SNOW... Coz that will slow it down...BIG
  40. TIME!
  41. > Try Using.. A Dimmensioned Variable eg Hi(320) Set 2 the size of the
  42. width of the screen... When
  43. > a snow flake hits the ground at a certain X coord Use the Hi()
  44. variable like so
  45.  
  46. > Hi(X)=Hi(X)+1
  47.  
  48. > This will increase the height of the snow on the ground and can be
  49. read in when the next snowflake hits the same point.... Does that help?
  50.  
  51. Looks good to me ;), I've just updated my code with this idea, and it
  52. seems to be a little faster now. Here is the new ver.
  53.  
  54. See ya.
  55. -- 
  56.                                 <PRE>
  57.   - --------------------- Quote of the day: ---------------------- -
  58. Everything should be made as simple as possible, but not simpler.
  59. -- Albert Einstein
  60.  
  61. +--------------------------------------------------------------------+
  62. |                                                ,aNNN               |
  63. |  a&   NL                 ,a,                 ,gNNNNN               |
  64. |  @7L d 0   ,a,,aw ,a,,  JN Q,  ,a,,aw,,,,  ,gNM"`NN'               |
  65. | J  9w"  K N" "" NN"""""WF  ~3&N" "" N   ""^N"    NF                |
  66. | N , " , Nd ,@M, NN JML @ML d@N ,@4, N       ',  JK                 |
  67. |d JMc dN  N  NN  NN 0 1 1J1 0 0  NN  N         L,K                  |
  68. |N,N 0w' Na@h,,a,,NQ,0 &J1J&,0  \,,a,,N         JF                   |
  69. | ""  "  ~"  ""~"""~"" ""  """  t""~"""        j"1                   |
  70. |                               F             JgmJ        ,gm        |
  71. |                               F            N"  N  ,,    F ,N gNN   |
  72. |      Andrew Crowe             Q          jJF  mP p""9w,NL NwmP 0mw |
  73. |      ~~~~~~~~~~~~             ]         / I  0 F@ am, Nw  ,0&   ,N |
  74. |       Manta Soft             ,F\      a' ,N  Nf L E 0 0ML N""N 0"  |
  75. |       ~~~~~~~~~~            ,N  \,  ,P N@"  JF  & `@" NJL N  N 0   |
  76. |                            ,N     ad"   \wam"   `Nx,aN JNmN  NmN   |
  77. |                            NN ,,gN" ""PP"                          |
  78. |                           dNNNNN"                                  |
  79. |                           NNN@"      Web Designing and          // |
  80. | Visit our Web Site:       ""               Amiga Programming \\//  |
  81. |                                                                    |
  82. |     HTTP://www.geocities.com/Eureka/Gold/1713/                     |
  83. |                                                                    |
  84. +----------------------------+      This signature was created using |
  85. | andrewcrowe@enterprise.net |         AsciiArt Studio               |
  86. +----------------------------+---------------------------------------+
  87.                                 </PRE>
  88. --BOUNDARY.1197282024.4
  89. Content-Type: text/plain; name="Snow2.Asc"
  90. Content-Disposition: attachment; filename="Snow2.Asc"
  91. Content-Description: John Glanville <John.Glanville@btinternet.com>
  92.  
  93. '                           *
  94. '           *
  95. ' *                 *
  96. '  SNOW 2, by AndrewCrowe@enterprise.net   * 
  97. '    *              *
  98. '                            * 
  99. '
  100. NOF=100
  101. '  Number of flakes, less=faster 
  102. Screen Open 0,320,200,8,Lowres
  103. Flash Off 
  104. '
  105. ' Keep the colours down for speed
  106. '
  107.  
  108. MY=Screen Height
  109. MX=Screen Width
  110.  
  111. Dim SFLAKES#(NOF,1),SFLAKES(NOF,1),HT(MX)
  112.  
  113. For A=0 To MX
  114.    HT(A)=MY
  115. Next 
  116.  
  117. 'Use floating point for accuracy.
  118. 'SFLAKES#(NOF,0) - X 
  119. 'SFLAKES#(NOF,1) - Y 
  120. 'SFLAKES(NOF,0) - angle for wind offset  
  121. 'Sflakes(NOF,1) - colour   
  122.  
  123. For A=0 To NOF
  124.    
  125.    SFLAKES#(A,0)=Rnd(MX)
  126.    SFLAKES#(A,1)=Rnd(MY)
  127.    SFLAKES(A,0)=Rnd(90)
  128.    ' Dont want the angle dif. to be too big 
  129.    
  130.    SFLAKES(A,1)=Rnd(6)
  131.    ' Colour 7 is snow on ground 
  132.    
  133. Next 
  134.  
  135. Colour 1,$333
  136. Colour 2,$555
  137. Colour 3,$777
  138. Colour 4,$999
  139. Colour 5,$BBB
  140. Colour 6,$DDD
  141. Colour 7,$FFF
  142.  
  143. Degree 
  144. Cls 0
  145. 'Double Buffer 
  146. 'Autoback 0
  147. NO=0
  148. Do 
  149.    
  150.    RNO=Rnd(2) : Rem wind Angle changes randomly  
  151.    
  152.    
  153.    
  154.    For A=0 To NOF
  155.       Gosub CALC
  156.    Next 
  157.  
  158.    'Wait Vbl  
  159.    
  160.  
  161. Loop 
  162. CALC:
  163. OX=SFLAKES#(A,0)
  164. OY=SFLAKES#(A,1)
  165. 'buffer pos. so that you can erase old flake 
  166.  
  167. F=SFLAKES(A,1)
  168. FF=F/4+1
  169.  
  170. SFLAKES#(A,1)=SFLAKES#(A,1)+FF
  171. XAD#=Sin(SFLAKES(A,0))*FF
  172. '  Add wind
  173. SFLAKES#(A,0)=SFLAKES#(A,0)+XAD#
  174. If SFLAKES#(A,0)<0 Then SFLAKES#(A,0)=SFLAKES#(A,0)+MX
  175. If SFLAKES#(A,0)>MX Then SFLAKES#(A,0)=SFLAKES#(A,0)-MX
  176.  
  177. SFLAKES(A,0)=SFLAKES(A,0)+RNO
  178. ' Change wind
  179. If SFLAKES(A,0)>360
  180.    SFLAKES(A,0)=0
  181. End If 
  182. X=SFLAKES#(A,0)
  183. Y=SFLAKES#(A,1)
  184. 'P=F Point(X,Y)
  185.  
  186. If Y>HT(X)-1
  187.    
  188.    
  189.    ''''''''''''''''''''''''''''''''   
  190.    Y=HT(X)-1
  191.    Repeat 
  192.       D=0
  193.       X2=X
  194.       If X<MX and X>-1
  195.          If Y+1>HT(X+1)
  196.             X2=X2-1
  197.             D=D+1
  198.          End If 
  199.       Else 
  200.          X2=X2-1
  201.          D=D+1
  202.       End If 
  203.       
  204.       If X>0 and X<MX+1
  205.          If Y+1>HT(X-1)
  206.             X2=X2+1
  207.             D=D+1
  208.          End If 
  209.       Else 
  210.          X2=X2+1
  211.          D=D+1
  212.       End If 
  213.       X=X2
  214.       If D=0
  215.          X=X+Rnd(2)-1
  216.       End If 
  217.       Repeat 
  218.          Y=Y+1
  219.       Until Y+1>HT(X)
  220.    Until D=2
  221.    '''''''''''''''''''''''''''''''''''''
  222.    ' Oooo, new code, no 'point' involved :) 
  223.    
  224.    
  225.    
  226.    If X>-1 and X<MX+1
  227.       Y=HT(X)-1
  228.       HT(X)=Y
  229.    End If 
  230.    
  231.    If OY+1>HT(OX)
  232.       F Plot OX,OY,7
  233.    Else 
  234.       F Plot OX,OY,0
  235.    End If 
  236.    
  237.    F Plot X,Y,7
  238.    SFLAKES#(A,0)=Rnd(MX)
  239.    SFLAKES#(A,1)=0
  240. Else 
  241.    
  242.    F Plot OX,OY,0
  243.    F Plot X,Y,SFLAKES(A,1)
  244.    ' Update snow
  245. End If 
  246. Return 
  247.  
  248. --BOUNDARY.1197282024.4--
  249.  
  250.